package com.bsj.power.system.web;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.bsj.power.common.config.global.JsonResult;
import com.bsj.power.common.def.vo.sys.exceptionlog.ISysExceptionLogSearchVO;
import com.bsj.power.common.def.vo.sys.exceptionlog.OSysExceptionLogPageVO;
import com.bsj.power.system.service.SysExceptionLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : zhuojie.c
 * @version V1.0
 * @Description: 异常记录模块
 * @date Date : 2024年08月22日
 */
@Slf4j
@RestController
@RequestMapping("/system/sysException")
//@SaCheckPermission("/master/system/monitor")
public class SysExceptionLogController {

    @Autowired
    private SysExceptionLogService exceptionLogService;

    /**
     * 异常记录
     *
     * @return
     */
    @GetMapping("/sysExceptionList")
    public JsonResult<List<OSysExceptionLogPageVO>> exceptionList(@Validated ISysExceptionLogSearchVO exceptionLogPageVO) {
        return exceptionLogService.exceptionList(exceptionLogPageVO);
    }
}
